/* =========================================
   UPDATED: Automatic Architectural Grid
   ========================================= */

.deep-dive-gallery {
    /* 95% is much safer than 4280px—it will stretch massive on 4K monitors but won't break smaller screens */
    max-width: 95%; 
    margin: 0 auto;
    padding: 4rem 2rem 6rem 2rem;
    border-top: 1px solid #eee; 
}

.deep-dive-gallery h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 3rem;
    font-weight: 400;
    text-align: center;
}

/* --- 1. The Grid --- */
.mosaic-grid {
    display: grid;
    /* This creates 2 massive columns. Change to '3' if you want them slightly smaller */
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px; 
    /* NOTICE: I have completely removed the grid-auto-rows that forced them to be tall */
}

/* --- 2. The Box holding the image --- */
.mosaic-img-wrapper {
    width: 100%;
    height: auto; /* Changed to auto so it wraps your image naturally */
    border-radius: 4px; 
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    /* Removed flex-grow */
}

/* --- 3. The Image --- */
.mosaic-img-wrapper img {
    width: 100%;
    height: auto; /* Changed to auto to keep the exact original aspect ratio */
    display: block;
    transition: transform 0.4s ease;
    /* NOTICE: object-fit: cover; has been removed so no cropping happens */
}

/* Hover Effects */
.mosaic-item:hover .mosaic-img-wrapper {
    border-color: #11676d; /* Teal Border */
}

.mosaic-item:hover .mosaic-img-wrapper img {
    transform: scale(1.05); /* Soft zoom effect inside the box */
}

/* The Name Label */
.mosaic-item p {
    color: #11676d; 
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-top: 10px;
    flex-shrink: 0;
}

/* --- 4. AUTOMATIC STAGGERED SIZING (Desktop Only) --- */
/* This recreates your reference photo by randomly making some images much wider! */
@media (min-width: 1024px) {
    /* Makes every 3rd image automatically span 2 columns */
    .mosaic-item:nth-child(3n) {
        grid-column: span 2;
    }
    
    /* Makes every 7th image massive (spans 2 columns AND 2 rows tall) */
    .mosaic-item:nth-child(7n) {
        grid-column: span 2;
        grid-row: span 2;
    }
}

/* =========================================
   MOBILE RESPONSIVE - PALMNEST FIX
========================================= */
@media (max-width: 992px) {
  /* 1. Forces the navbar to float transparently OVER the image */
  .navbar { 
    position: absolute !important; 
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: transparent !important; 
    padding: 15px 20px !important; 
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
  }
  
  .brand-container {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    max-width: calc(100% - 50px) !important; /* Protects the hamburger menu */
  }
  
  .logo {
    height: 32px !important; 
    width: auto !important;
    display: block !important;
    flex-shrink: 0 !important;
  }
  
  /* 2. Forces text to stay on ONE line and adds shadow for readability over the sky */
  .brand-text { 
    color: #fce03b; 
    font-size: 0.9rem; 
    letter-spacing: 1px; 
    text-shadow: none; 
    white-space: normal; 
    line-height: 1.2; 
  }
  
  .menu-toggle { display: flex !important; margin-left: auto !important; }
  .menu-toggle .bar { background-color: #ffffff !important; } /* White hamburger */
  
  .nav-links {
    display: flex !important; flex-direction: column !important; position: absolute !important; 
    top: 100% !important; left: -100% !important; width: 100% !important; 
    background-color: rgba(17, 103, 109, 0.98) !important; text-align: center !important; 
    transition: 0.3s ease !important; padding: 2rem 0 !important; box-shadow: 0 10px 15px rgba(0,0,0,0.2) !important;
    z-index: 999 !important;
  }
  
  .nav-links.active { left: 0 !important; }
  .nav-links li { margin: 15px 0 !important; }
}